Now we are in the second exercise session. Non-flat files were promised, so please load the GESIS Panel COVID-19 survey data.
This first part of the exercises only deals with importing data. Later, in the second part, we will turn to labelling and exporting.
haven package.
In contrast to the flat files, such as CSV, the variables now have labels.
sjlabelled::get_label(your_data), but you have to make sure only to print the first ten variables.
Unfortunately, it’s all in German. Imagine you are an education researcher, and you are interested in the variable education_cat. So you may want to consider translating the variable into English.
education_cat from “Bildung, kategorisiert” to “Education, categorized”.
sjlabelled::set_label() or do it in a pipe with sjlabelled::var_labels().
Your colleague asks you to provide your new data after changing labels and stuff. Unfortunately, she does not use R or SPSS and asks you to export your data as a Stata file.
haven package.